Request For Payment Outbound
The RequestForPayment API enables to request for a payment from the sender.
Method: POST
{{URL}}/rtp/rpc/TransactionService/RequestForPayment
Headers
Name | Value |
---|---|
Content-Type | application/json |
Credential | "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmN5NWQxY2RlNDE5" |
Signature | "{{signature}}" |
Example
Payload Parameters
Parameter | Description |
---|---|
referenceNumber Mandatory | String Unique reference number of the request Example – "2023081892413659999Vfy9n1NLx9kEewF" |
processor Mandatory | String Payment channel through which the transaction happens Example – "TCH" or "FedNow" |
senderType Mandatory (Applicable only for TCH) | String Type of customer Example – "BUSINESS" |
debtorAccount Mandatory | Object |
memberId Mandatory | String Routing number of the receiver bank Example – "234567891" |
Name Mandatory | String Name of the receiver account holder Example – "hjaa" |
accountNumber Mandatory | String Account number of the receiver Example – "1234565678" |
dateAndPlaceOfBirth Mandatory (Applicable only for TCH) | Object |
birthDate Mandatory | String Birth date of receiver Example – "1990-01-19" |
cityOfBirth Mandatory | String Birth city of receiver Example – "New York" |
countryOfBirth Mandatory | String Birth country code of receiver Example – "US" |
address Optional (Applicable only for TCH) | Object |
streetName Optional | String Street name of the receiver address Example – "Facebookstreet" |
postalCode Optional | String Postal code of the receiver address Example – "Kotre" |
townName Optional | String Town name of the receiver address Example – "Chicago" |
countrySubDiv Optional | String Code of a subdivision which can be a state, province, or region Example – "LM" |
country Optional | String Country code of the receiver address Example – "US" |
creditorAccount | Object |
memberId Mandatory | String Routing number of the sender bank Example – "072403473" |
Name Mandatory | String Name of the sender account holder Example – "Seve" |
accountNumber Mandatory | String Account number of the sender Example – "123457890" |
dateAndPlaceOfBirth Mandatory (Applicable only for TCH) | Object |
birthDate Mandatory | String Birth date of sender Example – "1990-01-20" |
cityOfBirth Mandatory | String Birth city of sender Example – "New York" |
countryOfBirth Mandatory | String Birth country code of sender Example – "US" |
address Optional (Applicable only for TCH) | Object |
streetName Optional | String Street name of the sender address Example – "sdsds" |
postalCode Optional | String Postal code of the sender address Example – "1245" |
townName Optional | String Town name of the sender address Example – "Chicago" |
countrySubDiv Optional | String Code of a subdivision which can be a state, province, or region Example – "LM" |
country Optional | String Country code of the sender address Example – "US" |
paymentInfo Mandatory | Object |
expDate Mandatory | String Expiry date of the payment request Example – "2024-03-28" |
payCond Mandatory (Applicable only for TCH) | Object |
amtModAllwd Mandatory | Boolean Whether request amount can be modified True – can be modified False – can not be modified Example – "false" |
earlyPmtAllwd Mandatory | Boolean Whether early payment is allowed True – allowed False – not allowed Example – "true" |
grntedPmtReqd Mandatory | Boolean Whether the guaranteed payment is requested or not True – requested False – not requested Example – "false" |
instructedAmount Mandatory | Object |
Amount Mandatory | Number Amount of transaction Example – 22759 |
Currency Mandatory | String Currency code of the transaction Example – "USD" |
- cURL
- C#
- Go
- NodeJs
curl --location '{{URL}}/rtp/rpc/TransactionService/RequestForPayment' \
--header 'Content-Type: application/json' \
--data '{"referenceNumber":"M20231109918765022223","processor":"TCH","senderType":"BUSINESS","debtorAccount":{"memberId":"234567891","Name":"hjaa","accountNumber":"1234565678","dateAndPlaceOfBirth":{"birthDate":"1990-01-19","cityOfBirth":"New York","countryOfBirth":"US"},"address":{"streetName":"Facebookstreet","postalCode":"Kotre","townName":"Chicago","countrySubDiv":"LM","country":"US"}},"creditorAccount":{"memberId":"072403473","name":"Seve","accountNumber":"123457890","dateAndPlaceOfBirth":{"birthDate":"1990-01-20","cityOfBirth":"New York","countryOfBirth":"US"},"address":{"streetName":"sdsds","postalCode":"1245","townName":"Chicago","countrySubDiv":"LM","country":"US"}},"paymentInfo":{"expDate":"2024-03-28"},"payCond":{"amtModAllwd":false,"earlyPmtAllwd":true,"grntedPmtReqd":false},"instructedAmount":{"amount":22759,"currency":"USD"}}'
var options = new RestClientOptions("{{URL}}")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/rtp/rpc/TransactionService/RequestForPayment", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""referenceNumber"": ""M20231109918765022223"",
" + "\n" +
@" ""processor"": ""TCH"",
" + "\n" +
@" ""senderType"": ""BUSINESS"",
" + "\n" +
@" ""debtorAccount"": {
" + "\n" +
@" ""memberId"": ""234567891"",
" + "\n" +
@" ""Name"": ""hjaa"",
" + "\n" +
@" ""accountNumber"": ""1234565678"",
" + "\n" +
@" ""dateAndPlaceOfBirth"": {
" + "\n" +
@" ""birthDate"": ""1990-01-19"",
" + "\n" +
@" ""cityOfBirth"": ""New York"",
" + "\n" +
@" ""countryOfBirth"": ""US""
" + "\n" +
@" },
" + "\n" +
@" ""address"": {
" + "\n" +
@" ""streetName"": ""Facebookstreet"",
" + "\n" +
@" ""postalCode"": ""Kotre"",
" + "\n" +
@" ""townName"": ""Chicago"",
" + "\n" +
@" ""countrySubDiv"": ""LM"",
" + "\n" +
@" ""country"": ""US""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""creditorAccount"": {
" + "\n" +
@" ""memberId"": ""072403473"",
" + "\n" +
@" ""name"": ""Seve"",
" + "\n" +
@" ""accountNumber"": ""123457890"",
" + "\n" +
@" ""dateAndPlaceOfBirth"": {
" + "\n" +
@" ""birthDate"": ""1990-01-20"",
" + "\n" +
@" ""cityOfBirth"": ""New York"",
" + "\n" +
@" ""countryOfBirth"": ""US""
" + "\n" +
@" },
" + "\n" +
@" ""address"": {
" + "\n" +
@" ""streetName"": ""sdsds"",
" + "\n" +
@" ""postalCode"": ""1245"",
" + "\n" +
@" ""townName"": ""Chicago"",
" + "\n" +
@" ""countrySubDiv"": ""LM"",
" + "\n" +
@" ""country"": ""US""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""paymentInfo"": {
" + "\n" +
@" ""expDate"": ""2024-03-28""
" + "\n" +
@" },
" + "\n" +
@" ""payCond"": {
" + "\n" +
@" ""amtModAllwd"": false,
" + "\n" +
@" ""earlyPmtAllwd"": true,
" + "\n" +
@" ""grntedPmtReqd"": false
" + "\n" +
@" },
" + "\n" +
@" ""instructedAmount"": {
" + "\n" +
@" ""amount"": 22759,
" + "\n" +
@" ""currency"": ""USD""
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/rtp/rpc/TransactionService/RequestForPayment"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"referenceNumber": "M20231109918765022223",`+"
"+`
"processor": "TCH",`+"
"+`
"senderType": "BUSINESS",`+"
"+`
"debtorAccount": {`+"
"+`
"memberId": "234567891",`+"
"+`
"Name": "hjaa",`+"
"+`
"accountNumber": "1234565678",`+"
"+`
"dateAndPlaceOfBirth": {`+"
"+`
"birthDate": "1990-01-19",`+"
"+`
"cityOfBirth": "New York",`+"
"+`
"countryOfBirth": "US"`+"
"+`
},`+"
"+`
"address": {`+"
"+`
"streetName": "Facebookstreet",`+"
"+`
"postalCode": "Kotre",`+"
"+`
"townName": "Chicago",`+"
"+`
"countrySubDiv": "LM",`+"
"+`
"country": "US"`+"
"+`
}`+"
"+`
},`+"
"+`
"creditorAccount": {`+"
"+`
"memberId": "072403473",`+"
"+`
"name": "Seve",`+"
"+`
"accountNumber": "123457890",`+"
"+`
"dateAndPlaceOfBirth": {`+"
"+`
"birthDate": "1990-01-20",`+"
"+`
"cityOfBirth": "New York",`+"
"+`
"countryOfBirth": "US"`+"
"+`
},`+"
"+`
"address": {`+"
"+`
"streetName": "sdsds",`+"
"+`
"postalCode": "1245",`+"
"+`
"townName": "Chicago",`+"
"+`
"countrySubDiv": "LM",`+"
"+`
"country": "US"`+"
"+`
}`+"
"+`
},`+"
"+`
"paymentInfo": {`+"
"+`
"expDate": "2024-03-28"`+"
"+`
},`+"
"+`
"payCond": {`+"
"+`
"amtModAllwd": false,`+"
"+`
"earlyPmtAllwd": true,`+"
"+`
"grntedPmtReqd": false`+"
"+`
},`+"
"+`
"instructedAmount": {`+"
"+`
"amount": 22759,`+"
"+`
"currency": "USD"`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/rtp/rpc/TransactionService/RequestForPayment',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"referenceNumber": "M20231109918765022223",
"processor": "TCH",
"senderType": "BUSINESS",
"debtorAccount": {
"memberId": "234567891",
"Name": "hjaa",
"accountNumber": "1234565678",
"dateAndPlaceOfBirth": {
"birthDate": "1990-01-19",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": {
"streetName": "Facebookstreet",
"postalCode": "Kotre",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"creditorAccount": {
"memberId": "072403473",
"name": "Seve",
"accountNumber": "123457890",
"dateAndPlaceOfBirth": {
"birthDate": "1990-01-20",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": {
"streetName": "sdsds",
"postalCode": "1245",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"paymentInfo": {
"expDate": "2024-03-28"
},
"payCond": {
"amtModAllwd": false,
"earlyPmtAllwd": true,
"grntedPmtReqd": false
},
"instructedAmount": {
"amount": 22759,
"currency": "USD"
}
});
req.write(postData);
req.end();
Request Body (Applicable for both FedNow and TCH)
{
"referenceNumber": "M20231109918765022223",
"processor": "TCH",
"senderType": "BUSINESS", //applicable only for TCH
"debtorAccount": {
"memberId": "234567891",
"Name": "hjaa",
"accountNumber": "1234565678",
"dateAndPlaceOfBirth": { //applicable only for TCH
"birthDate": "1990-01-19",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": { //applicable only for TCH
"streetName": "Facebookstreet",
"postalCode": "Kotre",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"creditorAccount": {
"memberId": "072403473",
"name": "Seve",
"accountNumber": "123457890",
"dateAndPlaceOfBirth": { //applicable only for TCH
"birthDate": "1990-01-20",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": { //applicable only for TCH
"streetName": "sdsds",
"postalCode": "1245",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"paymentInfo": {
"expDate": "2024-03-28"
},
"payCond": { //applicable only for TCH
"amtModAllwd": false,
"earlyPmtAllwd": true,
"grntedPmtReqd": false
},
"instructedAmount": {
"amount": 22759,
"currency": "USD"
}
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
reponse | String Response received for the given request Example – "JSON Representation of Received Response" |
message | String Outcome response message of the request Example – "success" |
endToEndId | String ID that enables to trace the transaction at any time during the process Example – "2023112720003056012345834" |
messageId | String Unique message ID generated for the transaction Example – "20240328111222474nsIvTjAq9f8z" |
rawMessage | String Raw response message related to the transaction encoded in Base64 Example – "Base64 Value of Received Response" |
status | String Current status of the transaction Example – "RCVD" |
paymentId | String Payment reference ID of the transaction Example – "20240328111112222T1BPQCW49266572611" |
Response Body (Applicable for both FedNow and TCH)
{
"response": "JSON Representation of Received Response",
"message": "success",
"endToEndId": "M20231109918765022223",
"messageId": "M20240328111112222T1BQDO49266572611",
"rawMessage": "Base64 Value of Received Response",
"status": "RCVD",
"paymentId": "20240328111112222T1BPQCW49266572611"
}